import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router';//1.引用路由模块
import {routes} from './routes';//3.引用路由配置变量
import axios from 'axios';//ajax请求插件
import VueAxios from 'vue-axios';
import MintUI from 'mint-ui';//ui框架
import 'mint-ui/lib/style.css';//需要单独引入
import store from './store/store';//01


Vue.use(VueRouter,axios,VueAxios,MintUI);//2.使用路由模块

const router=new VueRouter({//4.创建实例
  routes,//routes:routes的简写  //5.将路由变量实例化成路由对象
  mode:'history',
  scrollBehavior(to,from){
    if(to.hash){
      return{selector:to.hash}
    }
  }
})


new Vue({
  el: '#app',
  router,//6.实例化
  store,//02
  render: h => h(App)
})
